Regular Expression Tokens

This property box lets you build a custom token. The created token will use Pattern Matching to extract specified patterns of information from other tokens or values.

To configure Regular Expression Tokens

  1. Add the Pattern Matching activity to your workflow definition by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
  2. Select the activity in the Designer Pane.
  3. Under ClosedRegular Expression Tokens in the Properties Pane, click New Token.
  4. In the ClosedNew Pattern dialog box, enter a name for your custom token.
  5. Next to Input, type in the value you want your pattern to apply to. Click the Token button (right arrow) to use tokens.
  6. Next to Pattern, type in a regular expression or click the pattern matching button to a build a regular expression that will extract the desired information from the input. Show me a list of regular expressions I can use.
  7. Select the Allow tokens in the pattern checkbox to have tokens in your pattern be replaced by their value when the activity runs. You may want to allow tokens if you have a generic workflow that retrieves patterns from a database registry based off a field value or template. If this checkbox is selected, you can edit tokens in your pattern by right-clicking them. Clear this checkbox if you have regular expression syntax that you don't want mistaken for a token. If this checkbox is cleared, tokens will not be replaced and token syntax will be interpreted as regular expression syntax.
  8. Under Options, select Case Sensitive if you want the pattern matching process to respect case when looking for the desired information (the match).
  9. If multiple matches exist, you can select to return:
  1. Click Click here to test the pattern to validate your token. In the testing area, type a sample value in the Test Input text box. The information your regular expression extracted from the sample input value will appear under Result.
  2. Note: In the Test Input text box, line breaks are treated as part of the test value and not as multiple values of a multi-value token. This functionality allows you to test the input from a token that is likely to include line breaks, such as the Text token of the Retrieve Document Text activity. You can display the line breaks as characters by checking Show link break characters as \r and \n .

  3. Click OK.
  4. Optional: You can add to and organize your custom tokens in the Regular Expressions Tokens property box in the Properties Pane.